package com.itdata.entity;

/**   
 * @Title: UserInfo.java 
 * @Package com.itdata.entity 
 * @Description: TODO 
 * @author 陈凯 chenkai-ds@petrochina.com.cn   
 * @date 2013-5-14 下午9:00:45 
 * @version V1.0   
 */

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@Entity
@Table(name="users")
@XmlRootElement(name="UserInfo")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder={"userName","userAge"})
public class UserInfo {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="user_id")
	private int id;
	@Column(name="user_name")
	private String userName;
	@Column(name="user_password")
	private Integer userAge;
	
	public UserInfo(String name,Integer age){
		this.userAge = age;
		this.userName = name;
	}
	
	public UserInfo(){		
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Integer getUserAge() {
		return userAge;
	}

	public void setUserAge(Integer userAge) {
		this.userAge = userAge;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
}

